package com.geek.spring.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @program week05
 * @description: 自动化装配
 * @author: chanzhugang
 * @create: 2021/04/18 16:51
 */
public class AutoBeanMain {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        CDPlayer2 cdPlayer2 = (CDPlayer2) context.getBean("CDPlayer2");

        String str = "auto playing ";
        cdPlayer2.play(str);
    }

}